package com.arlin.springcloud.service.impl;

import com.arlin.springcloud.dao.DeptDao;
import com.arlin.springcloud.pojo.Dept;
import com.arlin.springcloud.service.DeptService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName: DeptServiceImpl
 * @Description: TODO
 * @Author: arlin
 * @Date: 2021/3/21
 */
@Service
public class DeptServiceImpl implements DeptService {

    private final DeptDao deptDao;

    public DeptServiceImpl(DeptDao deptDao) {
        this.deptDao = deptDao;
    }

    @Override
    public boolean addDept(Dept dept) {
        return deptDao.addDept(dept);
    }

    @Override
    public Dept queryById(Long id) {
        return deptDao.queryById(id);
    }

    @Override
    public List<Dept> queryAll() {
        return deptDao.queryAll();
    }
}
